Skip to content

Conversation

@NotTheEvilOne
Copy link
Contributor

What this PR does / why we need it:
This PR adds gl-cname as a script to parse and return the cname based on the features directory. It does not refactor the underlying code base even though many functions defined contain duplicated code.

Which issue(s) this PR fixes:
Relates gardenlinux/gardenlinux#2830

@NotTheEvilOne NotTheEvilOne self-assigned this Apr 4, 2025
@NotTheEvilOne NotTheEvilOne force-pushed the feature/support-cname-parser branch 4 times, most recently from baa8f2d to 431a6cc Compare April 4, 2025 06:40
@NotTheEvilOne NotTheEvilOne added this to the 2025-04 milestone Apr 4, 2025
@NotTheEvilOne NotTheEvilOne force-pushed the feature/support-cname-parser branch from 431a6cc to 1658ac1 Compare April 4, 2025 06:44
import re


def main():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for your reference, we also have the python-gardenlinux-cli, which is used as a CLI wrapper for this library.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... at least this was the initial intention. :D

not sure how to design this now, since python-gardenlinux-cli looks more like a tool for OCI only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if adding a separate CLI repository may not be counter productive as reusability of code between "lib" and "cli" parts are at least more complicated in that case. Naming of both repositories may be changed to reflect there content.

Furthermore GardenLinux does not have a Python code base that allows "lib" code to be used without a "cli" implementation. Therefore I would suggest to unify the code paths in place.

Copy link
Contributor

@yeoldegrove yeoldegrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with extending python-gardenlinux-lib and getting rid of python-gardenlinux-cli (I think @paulphys mentioned this).

Maybe another approach would be deprecating old code somehow (at least comment it inside the code) as we have duplicate code in this library already. Also identifying where this is actually used and where we can break things.

@NotTheEvilOne NotTheEvilOne force-pushed the feature/support-cname-parser branch 3 times, most recently from 836b73e to 51712b3 Compare April 18, 2025 11:46
@NotTheEvilOne NotTheEvilOne force-pushed the feature/support-cname-parser branch from 51712b3 to b48ffe0 Compare April 28, 2025 04:31
@NotTheEvilOne NotTheEvilOne merged commit e68538b into main Apr 28, 2025
8 of 12 checks passed
@yeoldegrove yeoldegrove deleted the feature/support-cname-parser branch May 13, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants